package com.lansi.bean;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
/**
 * 项目管理员表实体类
 * @author Administrator
 *
 */
public class User implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -724685917604735812L;
	private Integer id;
	private String username;
	private String sn;
	private String userkey;
	private String tel;
	private String usermail;
	private Date ctime;
	private String prio;
	
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getSn() {
		return sn;
	}
	public void setSn(String sn) {
		this.sn = sn;
	}
	public String getUserkey() {
		return userkey;
	}
	public void setUserkey(String userkey) {
		this.userkey = userkey;
	}
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	public String getUsermail() {
		return usermail;
	}
	public void setUsermail(String usermail) {
		this.usermail = usermail;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getCtime() {
		return ctime;
	}
	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}
	public String getPrio() {
		return prio;
	}
	public void setPrio(String prio) {
		this.prio = prio;
	}
	@Override
	public String toString() {
		return "User [id=" + id + ", username=" + username + ", sn=" + sn + ", userkey=" + userkey + ", tel=" + tel
				+ ", usermail=" + usermail + ", ctime=" + ctime + ", prio=" + prio + "]";
	}
	public User() {
		
	}
	
	public User(Integer id, String username, String sn, String userkey, String tel, String usermail, Date ctime,
			String prio) {
		super();
		this.id = id;
		this.username = username;
		this.sn = sn;
		this.userkey = userkey;
		this.tel = tel;
		this.usermail = usermail;
		this.ctime = ctime;
		this.prio = prio;
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((ctime == null) ? 0 : ctime.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((prio == null) ? 0 : prio.hashCode());
		result = prime * result + ((sn == null) ? 0 : sn.hashCode());
		result = prime * result + ((tel == null) ? 0 : tel.hashCode());
		result = prime * result + ((userkey == null) ? 0 : userkey.hashCode());
		result = prime * result + ((usermail == null) ? 0 : usermail.hashCode());
		result = prime * result + ((username == null) ? 0 : username.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		User other = (User) obj;
		if (ctime == null) {
			if (other.ctime != null)
				return false;
		} else if (!ctime.equals(other.ctime))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (prio == null) {
			if (other.prio != null)
				return false;
		} else if (!prio.equals(other.prio))
			return false;
		if (sn == null) {
			if (other.sn != null)
				return false;
		} else if (!sn.equals(other.sn))
			return false;
		if (tel == null) {
			if (other.tel != null)
				return false;
		} else if (!tel.equals(other.tel))
			return false;
		if (userkey == null) {
			if (other.userkey != null)
				return false;
		} else if (!userkey.equals(other.userkey))
			return false;
		if (usermail == null) {
			if (other.usermail != null)
				return false;
		} else if (!usermail.equals(other.usermail))
			return false;
		if (username == null) {
			if (other.username != null)
				return false;
		} else if (!username.equals(other.username))
			return false;
		return true;
	}
	
	
	
}
